package abstract_;

/**
 * @description:
 * @Author yyp
 * @time
 */
public class AbstractExercise01 {
    public static void main(String[] args) {
        Manager jerry = new Manager("jerry", 111, 100000);
        jerry.work();
        CommonEmployee tom = new CommonEmployee("tom", 12222, 10000);
        tom.work();
    }
}
abstract class Employee{
    String name;
    int id;
    double salary;
    abstract void work();
    public Employee(String name, int id, double salary) {
        this.name = name;
        this.id = id;
        this.salary = salary;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    public double getSalary() {
        return salary;
    }
    public void setSalary(double salary) {
        this.salary = salary;
    }
}
class Manager extends Employee{
    double bonus;
    public double getBonus() {
        return bonus;
    }
    public void setBonus(double bonus) {
        this.bonus = bonus;
    }
    public Manager(String name, int id, double salary) {
        super(name, id, salary);
    }
    @Override
    void work() {
        System.out.println("经理在工作");
    }
}
class CommonEmployee extends Employee{
    public CommonEmployee(String name, int id, double salary) {
        super(name, id, salary);
    }
    @Override
    void work() {
        System.out.println("普通员工在工作");
    }
}


